<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        function Animal(){
            this.eat = function(){
                console.log('吃东西')
            }
        }

        function Bird(){
            this.fly = function(){
                console.log('飞翔')
            }
        }

        function Cat(){
            Animal.call(this) //重点
            Bird.call(this) //重点
        }

        let cat = new Cat()
        cat.eat()
        cat.fly()

    </script>
</body>
</html>